package model.datastructure;

public abstract class AbstractSurface2D implements ISurface {

	protected int[] mSurface;

	protected Dimension1D mDimension;

	/**
	 * Constructor, creates a new surface with the given dimension
	 * @param dimention, the size of the new surface
	 */
	public AbstractSurface2D(Dimension1D dimention) {
		mDimension = dimention;
		mSurface = new int[mDimension.getLength()];
	}

	public abstract int getLowest();

	public abstract int getHighest();

	/**
	 * Returns the width of this surface (the length of the x axis)
	 * @return the width
	 */
	public int getWidth() {
		return mSurface.length;
	}

	public IDimension getDimension() {
		return mDimension;
	}

	public int[] getSurface() {
		return mSurface;
	}

}